#include <iostream>
#include <array>

int main(void)
{
    std::array<int, 10> a1 = {};
    int i = 0;

    for (std::array<int, 10>::iterator it = a1.begin(); it != a1.end(); it++)
        *it = ++i;

    for (auto it = a1.begin(); it != a1.end(); it++) // 自动类型推断
        std::cout << *it << " ";

    std::cout << std::endl;

    return 0;
}
